import 'package:flutter/material.dart';

void main() {
  return runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter体验',
      home: Scaffold(
        appBar: AppBar(
          title: Text('控件使用'),
        ),
        body: Row(
          children: <Widget>[
            Expanded(
                child: Text(
                  '111',
                  style: TextStyle(color: Colors.redAccent),
                ),
                flex: 2),
            Expanded(
                child: Text(
                  '222',
                  style: TextStyle(color: Colors.tealAccent),
                ),
                flex: 1)
            // Text('111'),
          ],
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
        ),
      ),
    );
  }
}
